home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / modelers / geomview / source.lha / Geomview / include / mg_xgl.h < prev    next >
C/C++ Source or Header  |  1992-01-30  |  3KB  |  81 lines

  1. /* Copyright (c) 1992 The Geometry Center; University of Minnesota
  2.    1300 South Second Street;  Minneapolis, MN  55454, USA;
  3.    
  4. This file is part of geomview/OOGL. geomview/OOGL is free software;
  5. you can redistribute it and/or modify it only under the terms given in
  6. the file COPYING, which you should have received along with this file.
  7. This and other related software may be obtained via anonymous ftp from
  8. geom.umn.edu; email: software@geom.umn.edu. */
  9.  
  10.  
  11. /* Authors: Charlie Gunn, Stuart Levy, Tamara Munzner, Mark Phillips */
  12.  
  13. /*
  14.  * Public interface to XGL version of mg library.
  15.  */
  16.  
  17. /*
  18.  * XGL-specific mgctxcreate(), mgctxset(), mgctxget() attributes.
  19.  * None are required, but may be supplied for extra control.
  20.  *
  21.  *    MG_XWINDOW        X window id to render XGL into.
  22.  *                If set, XGL uses X11 rather than XView.
  23.  *                Note: MG_XDISPLAY required if MG_XWINDOW used!
  24.  *                Default: use XView instead.
  25.  *
  26.  *    MG_XDISPLAY        Xlib Display *pointer* [not int index!]
  27.  *                Must be supplied if MG_XWINDOW set.
  28.  *
  29.  *    MG_XSCREEN        window's integer screen number on X display.
  30.  *                Default: Display's default screen
  31.  *
  32.  *
  33.  *    MG_REPAINT_PROC        called when redraw necessary.  Default
  34.  *                redraw routine sets "MG_REPAINT" attribute to 1.
  35.  *                [mgworldbegin() resets MG_REPAINT to 0.]
  36.  *                [What args should be passed?]
  37.  *
  38.  *    MG_RESIZE_PROC        called when window has been resized
  39.  *                by the window manager.  Default routine
  40.  *                sets MG_RESIZE attribute to 1 and calls
  41.  *                mgreshapeviewport().
  42.  *                
  43.  *
  44.  *    MG_XGL_STATE        XGL state as returned by xgl_open().
  45.  *                XGL requires that xgl_open be called just once
  46.  *                per process.  If caller has already called it,
  47.  *                you should pass the resulting state in to mg.
  48.  *                If not supplied, mg library calls xgl_open().
  49.  *
  50.  */
  51.  
  52.                 /* X11 parameters */
  53.  
  54. #define    MG_XWINDOW    140        /* Window (int, from Xlib) */
  55. #define    MG_XDISPLAY    141        /* Display * (Xlib Display pointer) */
  56. #define    MG_XSCREEN    142        /* int (integer screen number) */
  57.  
  58.                 /* XView parameters */
  59.  
  60. #define    MG_XV_FRAME    144        /* Frame (from XView) */
  61. #define    MG_XV_CANVAS    145        /* Canvas (from XView) */
  62. #define    MG_XV_WINDOW    146        /* Xv_Window win (not X11 Window id) */
  63.                     /*     (the "canvas paint window") */
  64. #define    MG_XV_RASTER    147        /* Xgl_win_ras  (XGL Raster handle)  */
  65.  
  66. #define    MG_REPAINT_PROC 148        /* void (*proc)()  time to repaint */
  67. #define    MG_RESIZE_PROC    149        /* void (*proc)()  window resized */
  68.  
  69.                 /* Miscellany */
  70.  
  71. #define    MG_REPAINT    150        /* int repaint_requested_by_xview */
  72. #define    MG_RESIZE    151        /* int resized_by_xview */
  73. #define    MG_XGL_STATE    152        /* Xgl_sys_state */
  74.  
  75.  
  76. /*
  77.  * XGL-specific routines
  78.  */
  79.  
  80. extern mgcontext *mgxgl_findctxbywin( int x11win );
  81.